<template>
  <div class="goods-model">
    <div class="view-box">
      <div class="goods-list">
        <div v-show="currentType!='all'" class="btns">
          <el-button @click="editTask()" type="warning">+添加任务</el-button>
        </div>
        <div v-show="currentType=='all'" class="search-box clearfix">
          <div style="overflow: hidden;">
            <div class="labelName lf">任务说明：</div>
            <el-input class="elInput lf" v-model="task_desc"></el-input>
            <div class="labelName lf">任务标题：</div>
            <el-input class="elInput lf" v-model="title"></el-input>
            <div class="labelName lf">任务类型：</div>
            <div class="cascader lf">
              <el-select v-model="task_type" placeholder="请选择">
                <el-option
                  v-for="item in taskTypeArr"
                  :key="item.value"
                  :label="item.name"
                  :value="item.value">
                </el-option>
              </el-select>
            </div>
            <div class="labelName lf">任务位置：</div>
            <div class="cascader lf">
              <el-select v-model="position_type" placeholder="请选择">
                <el-option
                  v-for="item in platforms"
                  :key="item.id"
                  :label="item.platform_name"
                  :value="item.id">
                </el-option>
              </el-select>
            </div>
          </div>
          <div style="overflow: hidden;margin-top: 20px;">
            <div class="labelName lf">创建时间：</div>
            <el-date-picker class="lf elInput" style="margin-right:10px;" value-format="yyyy-MM-dd 00:00:00"
                            v-model="start_time" type="date" placeholder="选择日期"></el-date-picker>
            <div class="labelName lf">至：</div>
            <el-date-picker value-format="yyyy-MM-dd 23:59:59" class="elInput lf" v-model="end_time" type="date"
                            placeholder="选择日期"></el-date-picker>
            <el-button class="lf" type="primary" @click="searchData()">查询</el-button>
          </div>
        </div>

        <div v-show="currentType=='all'" name="total" class="table-box">
          <el-table :data="goodsList" @selection-change="clickRow">
            <el-table-column label="图标">
              <template slot-scope="scope">
                <div class="goodsDetail clearfix">
                  <img :src="scope.row.full_image">
                </div>
              </template>
            </el-table-column>
            <el-table-column label="任务说明" prop="task_desc"></el-table-column>
            <el-table-column label="标题" prop="title"></el-table-column>
            <el-table-column label="任务类型" prop="task_type_desc"></el-table-column>
            <el-table-column label="显示位置" prop="position_type_desc"></el-table-column>
            <el-table-column label="点击任务数" prop="task_click_count"></el-table-column>
            <el-table-column label="参与/回复人数">
              <template slot-scope="scope">
                <div class="price">
                  {{scope.row.task_type==0?scope.row.in_count:scope.row.reply_count}}
                </div>
              </template>
            </el-table-column>
            <el-table-column label="点击链接数" prop="link_click_count"></el-table-column>
            <el-table-column label="奖励星星数" prop="total_award_stars"></el-table-column>
            <el-table-column label="创建时间" prop="created_at" width="110px"></el-table-column>
            <el-table-column label="操作" width="140px">
              <template slot-scope="scope">
                <div class="control">
                  <el-switch
                    @change="handleChangeDisplay(scope.row, scope.row.task_type)"
                    active-text="显示"
                    inactive-text="隐藏"
                    :active-value="1"
                    :inactive-value="0"
                    v-model="scope.row.is_display"
                    active-color="#3f87f5"
                    inactive-color="#e6e8f5">
                  </el-switch>
                  <a @click="editTask(scope.row)">编辑</a>
                  <a @click="handleClickDel(scope.row.id, scope.row.task_type)">删除</a>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div v-show="currentType==0" name="miniprogram" class="table-box">
          <el-table :data="goodsList" @selection-change="clickRow">
            <el-table-column label="图标">
              <template slot-scope="scope">
                <div class="goodsDetail clearfix">
                  <img :src="scope.row.full_image">
                </div>
              </template>
            </el-table-column>
            <el-table-column label="任务说明" prop="task_desc"></el-table-column>
            <el-table-column label="标题" prop="title"></el-table-column>
            <el-table-column label="应用简介" prop="app_guide"></el-table-column>
            <el-table-column label="任务指南" prop="task_guide"></el-table-column>
            <el-table-column label="显示位置" prop="position_type_desc"></el-table-column>
            <el-table-column label="点击任务数" prop="task_click_count"></el-table-column>
            <el-table-column label="参与人数" prop="in_count"></el-table-column>
            <el-table-column label="奖励星星数" prop="award_stars"></el-table-column>
            <el-table-column label="创建时间" prop="created_at" width="110px"></el-table-column>
            <el-table-column label="小程序appid" prop="app_id"></el-table-column>
            <el-table-column label="操作" width="140px">
              <template slot-scope="scope">
                <div class="control">
                  <el-switch
                    @change="handleChangeDisplay(scope.row, currentType)"
                    active-text="显示"
                    inactive-text="隐藏"
                    :active-value="1"
                    :inactive-value="0"
                    v-model="scope.row.is_display"
                    active-color="#3f87f5"
                    inactive-color="#e6e8f5">
                  </el-switch>
                  <a @click="editTask(scope.row)">编辑</a>
                  <a @click="handleClickDel(scope.row.id, scope.row.task_type)">删除</a>
                </div>
              </template>
            </el-table-column>
          </el-table>

        </div>
        <div v-show="currentType==1" name="gongzhonghao" class="table-box">
          <el-table :data="goodsList" @selection-change="clickRow">
            <el-table-column label="图标">
              <template slot-scope="scope">
                <div class="goodsDetail clearfix">
                  <img :src="scope.row.full_image">
                </div>
              </template>
            </el-table-column>
            <el-table-column label="二维码">
              <template slot-scope="scope">
                <div class="goodsDetail clearfix">
                  <img :src="scope.row.full_qrcode">
                </div>
              </template>
            </el-table-column>
            <el-table-column label="任务说明" prop="task_desc"></el-table-column>
            <el-table-column label="标题" prop="title"></el-table-column>
            <el-table-column label="应用简介" prop="app_guide"></el-table-column>
            <el-table-column label="任务指南" prop="task_guide"></el-table-column>
            <el-table-column label="显示位置" prop="position_type_desc"></el-table-column>
            <el-table-column label="回复关键字" prop="reply_keyword"></el-table-column>
            <el-table-column label="点击任务数" prop="task_click_count"></el-table-column>
            <el-table-column label="回复人数" prop="reply_count"></el-table-column>
            <el-table-column label="点击链接数" prop="link_click_count"></el-table-column>
            <el-table-column label="奖励星星数" prop="award_stars"></el-table-column>
            <el-table-column label="创建时间" prop="created_at" width="110px"></el-table-column>
            <el-table-column label="操作" width="140px">
              <template slot-scope="scope">
                <div class="control">
                  <el-switch
                    @change="handleChangeDisplay(scope.row, currentType)"
                    active-text="显示"
                    inactive-text="隐藏"
                    :active-value="1"
                    :inactive-value="0"
                    v-model="scope.row.is_display"
                    active-color="#3f87f5"
                    inactive-color="#e6e8f5">
                  </el-switch>
                  <a @click="editTask(scope.row)">编辑</a>
                  <a @click="handleClickDel(scope.row.id, scope.row.task_type)">删除</a>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div class="pagination">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page.sync="currentPage"
            :page-sizes="[10]"
            :page-size="10"
            layout="sizes, prev, pager, next"
            :total="totalCount">
          </el-pagination>
        </div>
      </div>
    </div>
    <el-dialog :visible.sync="editDialog" width="1000px;" :show-close="false">
      <div class="form-item clearfix">
        <div class="labelName lf">图标：</div>
        <div class="uploadImg-box lf" style="margin:0;">
          <div v-if="!form.image" class="uploadImg-tips">
            <div class="add-icon">+</div>
            <div class="des">添加图片</div>
            <input type="file" accept="image/jpg,image/jpeg,image/png" class="uploadInputFile"
                   @change="uploadImg($event,1)">
          </div>
          <div v-else class="previewImages">
            <img :src="form.showImage" alt="">
            <div class="change-btn">
              重新上传<input type="file" accept="image/jpg,image/jpeg,image/png" class="uploadInputFile"
                         @change="uploadImg($event,1)">
            </div>
          </div>
        </div>
      </div>
      <div v-show="form.task_type==1" class="form-item clearfix">
        <div class="labelName lf">二维码：</div>
        <div class="uploadImg-box lf" style="margin:0;">
          <div v-if="!form.qrcode" class="uploadImg-tips">
            <div class="add-icon">+</div>
            <div class="des">添加图片</div>
            <input type="file" accept="image/jpg,image/jpeg,image/png" class="uploadInputFile"
                   @change="uploadImg($event,2)">
          </div>
          <div v-else class="previewImages">
            <img :src="form.show_qrcode" alt="">
            <div class="change-btn">
              重新上传<input type="file" accept="image/jpg,image/jpeg,image/png" class="uploadInputFile"
                         @change="uploadImg($event,2)">
            </div>
          </div>
        </div>
      </div>
      <div class="form-item clearfix">
        <div class="labelName lf">任务说明：</div>
        <input v-model="form.task_desc" type="text" class="lf linkAddressInput">
      </div>
      <div class="form-item clearfix">
        <div class="labelName lf">任务类型：</div>
        <span class="labelName lf" style="text-align: left;">{{form.task_type==0?'小程序':'公众号'}}</span>
      </div>
      <div class="form-item clearfix">
        <div class="labelName lf">标题：</div>
        <input v-model="form.title" type="text" class="lf linkAddressInput">
      </div>
      <div class="form-item clearfix">
        <div class="labelName lf">应用简介：</div>
        <input v-model="form.app_guide" type="text" class="lf linkAddressInput">
        <div class="lf tips">
          {{form.task_type==0?'（选填）':''}}
        </div>
      </div>
      <div class="form-item clearfix">
        <div class="labelName lf">任务指南：</div>
        <input v-model="form.task_guide" type="text" class="lf linkAddressInput">
        <div class="lf tips">
          {{form.task_type==0?'（选填）':''}}
        </div>
      </div>
      <div class="form-item clearfix">
        <div class="labelName lf">奖励星星数：</div>
        <input v-model="form.award_stars" type="text" class="lf linkAddressInput">
      </div>
      <div class="form-item clearfix">
        <div class="labelName lf">小程序appid：</div>
        <input v-model="form.app_id" type="text" class="lf linkAddressInput">
      </div>
      <div v-show="form.task_type==0" class="form-item clearfix">
        <div class="labelName lf">跳转链接：</div>
        <input v-model="form.link" type="text" class="lf linkAddressInput">
        <div class="lf tips">（选填）</div>
      </div>
      <div v-show="form.task_type==1" class="form-item clearfix">
        <div class="labelName lf">回复关键字：</div>
        <input v-model="form.reply_keyword" type="text" class="lf linkAddressInput">
      </div>
      <div class="form-item clearfix">
        <div class="labelName lf">显示位置：</div>
        <el-select style="width: 475px;" v-model="form.position_type" placeholder="请选择">
          <el-option
            v-for="item in platforms"
            :key="item.id"
            :label="item.platform_name"
            :value="item.id">
          </el-option>
        </el-select>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button class="elButton" v-show="isEdit" @click="handleFormSubmit('edit', form.task_type)" type='primary'>编辑</el-button>
        <el-button class="elButton" v-show="!isEdit" type="primary" @click="handleFormSubmit('new', form.task_type)">确 定</el-button>
        <el-button class="elButton" @click="cancelSubmit()">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
  export default {
    name: "goods",
    data() {
      return {
        currentType: "1", //当前的分类类型
        taskTypeArr: [{
          value: '0',
          name: '小程序',
        }, {
          value: '1',
          name: '公众号',
        }],
        platforms: [],
        totalCount: 0, //总页数
        currentPage: 1,
        goodsList: [], //商品列表
        title: '',
        task_desc: '',
        task_type: '',
        position_type: '',
        start_time: "",
        end_time: "",
        form: {
          id: "",
          image: "",
          showImage: "",
          qrcode: "",
          show_qrcode: "",
          task_desc: "",   //任务说明
          title: "",       //标题
          app_guide: "",   //应用简介
          task_guide: "",  //任务指南
          award_stars: "", //奖励星星数量
          app_id: "",      //appid
          link: "",
          task_type: "",
          reply_keyword: "",  //回复关键字
          position_type: "",  //显示位置
        },
        isEdit: false,
        editDialog: false,
      };
    },
    watch: {
      $route(to, from) {
        this.$nextTick(() => {
          this.currentType = to.params.type;
          this.getListData(to.params.type, 1);
          this.currentType = to.params.type;
        });
      }
    },
    components: {},
    created() {
      //获取列表数据
      this.currentType = this.$route.params.type;
      this.getListData(this.currentType);
      this.getAllPlatforms();
    },
    mounted() {
    },
    methods: {
      //获取列表数据
      getListData() {
        var data = {};
        if (this.title) {
          data.title = this.title;
        }
        if (this.task_desc) {
          data.task_desc = this.task_desc;
        }
        if (this.currentType == 'all') {
          if (this.task_type) {
            data.task_type = this.task_type;
          }
        } else {
          data.task_type = this.currentType
        }
        if (this.position_type) {
          data.position_type = this.position_type;
        }
        if (this.start_time) {
          data.start_time = this.start_time;
        }
        if (this.end_time) {
          data.end_time = this.end_time;
        }
        this.$http(
          "/wgl_admin/index.php?app=task&act=index",
          "get",
          {},
          data,
          {},
          success => {
            this.goodsList = success.data.list;
            this.totalCount = success.data.total_count;
          },
          error => {
            this.$message.error(error.state.msg);
            console.log(error);
          }
        );
      },

      //获取任务位置
      getAllPlatforms() {
        this.$http(
          "/wgl_admin/index.php?app=task&act=get_all_platforms",
          "get",
          {},
          {},
          {},
          success => {
            this.platforms = success.data;
          },
          error => {
            console.log(error);
          }
        );
      },

      //查询操作
      searchData() {
        this.currentPage = 1;
        this.getListData();
      },

      //编辑任务
      editTask(row) {
        if (row) {
          this.isEdit = true;
          this.form = {
            id: row.id,
            image: row.image,
            showImage: row.full_image,
            qrcode: row.qrcode,
            show_qrcode: row.full_qrcode,
            task_desc: row.task_desc,  //任务说明
            title: row.title,      //标题
            app_guide: row.app_guide,   //应用简介
            task_guide: row.task_guide,  //任务指南
            award_stars: row.award_stars, //奖励星星数量
            app_id: row.app_id,      //appid
            link: row.link,
            task_type: row.task_type,
            reply_keyword: row.reply_keyword,
            position_type: row.position_type,  //显示位置
          };
        } else {
          this.isEdit = false;
          this.form = {
            id: "",
            image: "",
            showImage: "",
            qrcode: "",
            show_qrcode: "",
            task_desc: "",   //任务说明
            title: "",       //标题
            app_guide: "",   //应用简介
            task_guide: "",  //任务指南
            award_stars: "", //奖励星星数量
            app_id: "",      //appid
            link: "",
            task_type: this.currentType,
            reply_keyword: "",
            position_type: "",  //显示位置
          };
        }
        this.editDialog = true;
      },

      //显示或者隐藏
      handleChangeDisplay(row, type) {
        var url = "";
        var id = row.id;
        if (type == 0) {
          url = "/wgl_admin/index.php?app=task&act=edit_miniprogram_task";
        } else if (type == 1) {
          url = "/wgl_admin/index.php?app=task&act=edit_public_task ";
        }
        var formData = new FormData();
        formData.append("id", id);
        formData.append("is_display", row.is_display);
        this.$http(url,"post",{},{},formData,
          success => {
            this.$message.success('修改成功');
          }, error => {
            this.$message.error(error.state.msg);
          }
        );
      },

      //点击删除商品
      handleClickDel(targetId, task_type) {
        this.$confirm("是否确定删除该任务", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          let formData = new FormData();
          formData.append("id", targetId);
          var url = "";
          if (task_type == 0) {
            url = "/wgl_admin/index.php?app=task&act=drop_miniprogram_task";
          } else {
            url = "/wgl_admin/index.php?app=task&act=drop_public_task";
          }
          this.$http(
            url,
            "post",
            {},
            {},
            formData,
            success => {
              this.$message.success("删除成功");
              this.getListData();
            },
            error => {
              this.$message.error(error.state.msg);
              console.log(error);
            }
          );
        }).catch(() => {
        });
      },

      /*
       * @param ids  商品的数组
       * @param status 商品的状态
       * */
      controlGoodsStatus(ids, status) {
        let idStr = ids.join(",");
        let formData = new FormData();
        formData.append("ids", idStr);
        formData.append("status", status);
        this.$http(
          "/wgl_admin/index.php?app=goods&act=changeStatus",
          "post",
          {
            "Content-Type": "application/x-www-form-urlencoded"
          },
          {},
          formData,
          success => {
            this.$message.success(success.state.msg);
            this.getListData("all", this.currentPage);
          },
          error => {
            this.$message.error(error.state.msg);
            console.log(error);
          }
        );
      },

      //编辑任务信息
      handleFormSubmit(way, type) {
        let reqArr, url;
        if (type == 0) {
          way === "new"
            ? (url = "/wgl_admin/index.php?app=task&act=add_miniprogram_task")
            : (url = "/wgl_admin/index.php?app=task&act=edit_miniprogram_task");
        } else if (type == 1) {
          way === "new"
            ? (url = "/wgl_admin/index.php?app=task&act=add_public_task")
            : (url = "/wgl_admin/index.php?app=task&act=edit_public_task");
        }

        if (type == 0) {
          reqArr = [
            ["image", "string", "请上传图标"],
            ["task_desc", "string", "请输入任务说明"],
            ["title", "string", "请输入标题"],
            ["award_stars", "number", "请输入奖励星星数量"],
            ["app_id", "string", "请输入小程序appid"],
            ["position_type", "number", "请选择显示位置"]
          ];
        } else {
          reqArr = [
            ["image", "string", "请上传图标"],
            ["qrcode", "string", "请上传二维码"],
            ["task_desc", "string", "请输入任务说明"],
            ["title", "string", "请输入标题"],
            ["app_guide", "string", "请输入应用简介"],
            ["task_guide", "string", "请输入任务指南"],
            ["award_stars", "number", "请输入奖励星星数量"],
            ["app_id", "string", "请输入小程序appid"],
            ["reply_keyword", "string", "请输入回复关键字"],
            ["position_type", "number", "请选择显示位置"]
          ];
        }
        let res = this.$requiredFun(reqArr, this.form);
        if (res.state) {
          let formData = new FormData();
          if (way === "edit") {
            formData.append("id", this.form.id);
          }
          if (type == 0) {
            formData.append("link", this.form.link);
          } else {
            formData.append("qrcode", this.form.qrcode);
            formData.append("reply_keyword", this.form.reply_keyword);
          }
          formData.append("image", this.form.image);
          formData.append("task_desc", this.form.task_desc);
          formData.append("title", this.form.title);
          formData.append("app_guide", this.form.app_guide);
          formData.append("task_guide", this.form.task_guide);
          formData.append("award_stars", this.form.award_stars);
          formData.append("app_id", this.form.app_id);
          formData.append("position_type", this.form.position_type);
          formData.append("task_type", this.form.task_type);

          this.$http(
            url,
            "post",
            {},
            {},
            formData,
            success => {
              this.$message.success(success.state.msg);
              this.editDialog = false;
              this.getListData();
            },
            error => {
              this.$message.error(error.state.msg);
            }
          );
        } else {
          this.$message.error(res.msg);
        }
      },

      cancelSubmit() {
        this.editDialog = false;
      },

      //多选选择商品操作
      clickRow(selection) {
//        this.goodsArr = selection;
      },

      handleSizeChange() {
        console.log("每页分组");
      },

      //分页
      handleCurrentChange() {
        console.log(this.currentPage);
        this.getListData(this.currentType, this.currentPage);
      },

      //点击切换商品的状态（全部、出售中、已售完，仓存中）
      handleClickChangeType(data) {
        this.currentPage = 1;
        console.log(data.type);
        this.currentType = data.type;
        this.getListData(data.type, 1);
      },

      //上传图片
      uploadImg(e, type) {
        console.log('uploadImg')
        let currentDOM = e.target;
        var files = currentDOM.files;
//      console.log(files);
        var url = "/wgl_admin/index.php?app=upload_img";
        let formData = new FormData();
        if (type == 1) {
          formData.append("belong", 10);
        } else {
          formData.append("belong", 11);
        }
        formData.append("image", files[0]);
        //开始上传图片
        this.$http(
          url,
          "post",
          {},
          {},
          formData,
          success => {
            if (type === 1) {
              this.form.image = success.data.store_path;
              this.form.showImage = success.data.file_path;
            } else {
              this.form.qrcode = success.data.store_path;
              this.form.show_qrcode = success.data.file_path;
            }
          },
          error => {
            this.$message.error(error.state.msg);
          }
        );
      }
    },
  };
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
  .goods-model {
    width: 100%;
    position: relative;
    padding-left: 118px;
    .view-box {
      .goods-list {
        padding: 30px 58px 30px 50px;
      }
      .btns {
        min-width: 1080px;
        margin-bottom: 38px;
      }
      .search-box {
        border: 1px solid #e6e8f4;
        max-width: 1466px;
        min-width: 1146px;
        width: 100%;
        /*height: 90px;*/
        padding: 25px 30px;
        .elInput {
          display: block;
          width: 120px;
          font-size: 12px;
          color: #333;
          margin-right: 20px;
        }
        .cascader {
          margin-right: 20px;
        }
        .labelName {
          height: 40px;
          line-height: 40px;
          color: #333;
          font-size: 14px;
        }
      }
      .table-box {
        width: 100%;
        max-width: 1466px;
        margin-top: 40px;
      }
      .pagination {
        max-width: 1466px;
        width: 100%;
        text-align: right;
        margin-top: 46px;
      }
    }

  }

  .control {
    > a {
      color: #3f87f5;
      font-size: 12px;
      cursor: pointer;
    }
  }

  .goodsDetail {
    > img {
      width: 54px;
      height: 54px;
      text-align: center;
    }
    > span {
      text-align: left;
      width: 120px;
      word-wrap: break-word;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 4;
      overflow: hidden;
    }
  }

  .dialog-title {
    height: 70px;
    line-height: 70px;
    color: #333;
    border-bottom: 1px solid #e6e8f4;
    .titleName {
      font-size: 16px;
    }
    .control-btns {
      color: #e17474;
      font-size: 12px;
    }
  }

  .dialog-footer {
    display: block;
    height: 100%;
    width: 100%;
    padding-top: 18px;
    border-top: 1px solid #e6e8f4;
    .control-btns {
      font-size: 12px;
      color: #3f87f5;
      cursor: pointer;
      > a:first-child {
        margin-right: 40px;
      }
    }
  }

  .form-item {
    width: 650px;
    margin: 0 auto 20px;
    color: #666666;
    font-size: 12px;
    .labelName {
      width: 85px;
      text-align: right;
      height: 40px;
      line-height: 40px;
      margin-right: 10px;
    }
    .linkAddressInput {
      height: 40px;
      border: 1px solid #e6e8f4;
      padding: 0 28px;
      margin-right: 10px;
      width: 475px;
      padding: 0 28px;
    }
    .tips {
      height: 40px;
      line-height: 40px;
    }
  }

  .uploadImg-box {
    width: 110px;
    height: 110px;
    border: 1px solid #e6e8f4;
    background: #f8f9fe;
    position: relative;
    margin: 0 auto 50px;
    .uploadImg-tips {
      width: 100%;
      height: 100%;
      .add-icon {
        text-align: center;
        color: #e6e8f7;
        font-size: 40px;
        height: 70px;
        line-height: 70px;
      }
      .des {
        font-size: 14px;
        text-align: center;
        color: #a6a8a5;
      }
    }
    .previewImages {
      display: block;
      width: 100%;
      height: 100%;
      > img {
        display: block;
        height: 100%;
        width: 100%;
      }
      .change-btn {
        position: absolute;
        bottom: 0;
        text-align: center;
        width: 100%;
        background: rgba(0, 0, 0, 0.5);
        color: #fff;
        height: 24px;
        line-height: 24px;
        left: 0;
        cursor: pointer;
        font-size: 12px;
        cursor: pointer;
      }
      .change-btn:hover {
        background: #333;
      }
    }
    .uploadInputFile {
      width: 100%;
      height: 100%;
      opacity: 0;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      cursor: pointer;
      z-index: 9999;
      cursor: pointer;
    }
    .tips {
      height: 30px;
      line-height: 30px;
      color: #666;
      text-align: center;
      font-size: 14px;
    }
  }
</style>
